<p id="notice"><%= notice %></p>

<h1>Listing Country Cities</h1>

<table>
  <thead>
    <tr>
      <th>Name</th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @country_cities.each do |country_city| %>
      <tr>
        <td><%= country_city.name %></td>
<% if authorized? 'country/cities', :show, id: country_city.id  %>
        <td><%= link_to 'Show', country_city %></td>
<% end  %>
<% if authorized? 'country/cities', :edit, id: country_city.id  %>
        <td><%= link_to 'Edit', edit_country_city_path(country_city) %></td>
<% end  %>
<% if authorized? 'country/cities', :destroy, id: country_city.id  %>
        <td><%= link_to 'Destroy', country_city, method: :delete, data: { confirm: 'Are you sure?' } %></td>
<% end  %>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New City', new_country_city_path if authorized? 'country/cities', :new %>